CC        = g++
CCFLAGS   = -Wall -O
LD        = g++
LDFLAGS   = $(CCFLAGS)
SRCDIR    = ../src
INCLUDE   = ../src/
CCOMPILE  = $(CC) $(CCFLAGS) -I$(INCLUDE)

all: point.o querymaker.o scene.o point_example querymaker_example scene_example

point.o: $(SRCDIR)/point.cpp $(SRCDIR)/point.h
	$(CCOMPILE) $^ -c 

querymaker.o: $(SRCDIR)/querymaker.cpp $(SRCDIR)/querymaker.h
	$(CCOMPILE) $^ -c

scene.o: $(SRCDIR)/scene.cpp $(SRCDIR)/scene.h 
	$(CCOMPILE) $^ -c

point_example: point_example.cpp point.o
	$(CCOMPILE) $^ -o $@

querymaker_example: querymaker_example.cpp querymaker.o
	$(CCOMPILE) $^ -lboost_system -lboost_thread -o $@

scene_example: scene_example.cpp querymaker.o point.o scene.o
	$(CCOMPILE) $^ -lboost_system -lboost_thread -lboost_regex -o $@

clean:
	rm *.o *_example
